package com.seray.zebraprintlib.content;

import com.seray.zebraprintlib.config.PrintConfig;

/**
 * Author：李程
 * CreateTime：2018/9/8 21:07
 * E-mail：licheng@kedacom.com
 * Describe：线条
 * ^FO26,25^GB782,2433,6^FS
 * ^FO31,1237^GB772,0,5^FS
 * ^FO443,31^GB0,2148,5^FS
 * ^FO347,32^GB0,2420,5^FS
 * ^FO157,31^GB0,2419,5^FS
 * ^FO256,31^GB0,2419,4^FS
 * ^FO552,31^GB0,2148,5^FS
 * ^FO660,30^GB0,2423,6^FS
 */
public class LineContent extends AZebraContent {

    private int from;
    private int to;

    public LineContent(int x, int y, int from, int to) {
        super(x, y, PrintConfig.NORMAL_LINE_SIZE, PrintConfig.Direction.N, null, null);
        this.from = from;
        this.to = to;
        LINE_TYPE = "^GB";
    }

    @Override
    public String install() {
        return LINE_START
                + x + COMMA
                + y
                + LINE_TYPE
                + from + COMMA
                + to + COMMA
                + size
                + FILED_END
                + BREAK;
    }
}
